/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.system.bajlam.code.dbentities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Kevin
 */
@Entity
@Table(name = "baj_vent_cliente")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "BajVentCliente.findAll", query = "SELECT b FROM BajVentCliente b"),
    @NamedQuery(name = "BajVentCliente.findByNit", query = "SELECT b FROM BajVentCliente b WHERE b.nit = :nit"),
    @NamedQuery(name = "BajVentCliente.findByNombre", query = "SELECT b FROM BajVentCliente b WHERE b.nombre = :nombre"),
    @NamedQuery(name = "BajVentCliente.findByApellido", query = "SELECT b FROM BajVentCliente b WHERE b.apellido = :apellido"),
    @NamedQuery(name = "BajVentCliente.findByDireccion", query = "SELECT b FROM BajVentCliente b WHERE b.direccion = :direccion"),
    @NamedQuery(name = "BajVentCliente.findByTelefono", query = "SELECT b FROM BajVentCliente b WHERE b.telefono = :telefono"),
    @NamedQuery(name = "BajVentCliente.findByEstado", query = "SELECT b FROM BajVentCliente b WHERE b.estado = :estado")})
public class BajVentCliente implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 8)
    @Column(name = "nit")
    private String nit;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 55)
    @Column(name = "nombre")
    private String nombre;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 55)
    @Column(name = "apellido")
    private String apellido;
    @Size(max = 100)
    @Column(name = "direccion")
    private String direccion;
    @Column(name = "telefono")
    private Integer telefono;
    @Basic(optional = false)
    @NotNull
    @Column(name = "estado")
    private int estado;

    public BajVentCliente() {
    }

    public BajVentCliente(String nit) {
        this.nit = nit;
    }

    public BajVentCliente(String nit, String nombre, String apellido, int estado) {
        this.nit = nit;
        this.nombre = nombre;
        this.apellido = apellido;
        this.estado = estado;
    }

    public String getNit() {
        return nit;
    }

    public void setNit(String nit) {
        this.nit = nit;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getApellido() {
        return apellido;
    }

    public void setApellido(String apellido) {
        this.apellido = apellido;
    }

    public String getDireccion() {
        return direccion;
    }

    public void setDireccion(String direccion) {
        this.direccion = direccion;
    }

    public Integer getTelefono() {
        return telefono;
    }

    public void setTelefono(Integer telefono) {
        this.telefono = telefono;
    }

    public int getEstado() {
        return estado;
    }

    public void setEstado(int estado) {
        this.estado = estado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nit != null ? nit.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BajVentCliente)) {
            return false;
        }
        BajVentCliente other = (BajVentCliente) object;
        if ((this.nit == null && other.nit != null) || (this.nit != null && !this.nit.equals(other.nit))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.system.bajlam.code.dbentities.BajVentCliente[ nit=" + nit + " ]";
    }
    
}
